Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add caching to the wordpress.org query to get plugin information. #1022

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

thelovekesh
Copy link
Member

Summary

Fixes #1015

Relevant technical choices

Checklist

  • PR has either [Focus] or Infrastructure label.
  • PR has a [Type] label.
  • PR has a milestone or the no milestone label.

@thelovekesh thelovekesh added [Type] Enhancement A suggestion for improvement of an existing feature Infrastructure Issues for the overall performance plugin infrastructure no milestone PRs that do not have a defined milestone for release labels Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: thelovekesh <thelovekesh@git.wordpress.org>
Co-authored-by: westonruter <westonruter@git.wordpress.org>
Co-authored-by: felixarntz <flixos90@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@@ -37,6 +43,8 @@ function perflab_query_plugin_info( string $plugin_slug ) {
$plugin = (array) $plugin;
}

set_transient( 'perflab_plugin_info_' . $plugin_slug, $plugin, HOUR_IN_SECONDS );
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The TTL could probably be higher but I don't feel strongly about it.

Copy link
Member

@westonruter westonruter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@felixarntz felixarntz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @thelovekesh! LGTM.

@felixarntz felixarntz added this to the PL Plugin 3.0.0 milestone Mar 4, 2024
@felixarntz felixarntz removed the no milestone PRs that do not have a defined milestone for release label Mar 4, 2024
@felixarntz felixarntz changed the title Add caching on WPOrg plugins query Add caching to the wordpress.org query to get plugin information. Mar 4, 2024
@felixarntz felixarntz merged commit 8c718b5 into trunk Mar 4, 2024
43 of 44 checks passed
@felixarntz felixarntz deleted the add/cache-plugin_api-calls branch March 4, 2024 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Infrastructure Issues for the overall performance plugin infrastructure [Type] Enhancement A suggestion for improvement of an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PL admin performance can be improved
3 participants